Halogen monitoring apparatus

ABSTRACT

An apparatus for monitoring the concentration levels of halogen gas in a gaseous atmosphere as confined in an enclosure over a relatively extended period of time. Such monitoring apparatus includes a sensor including first and second electrodes disposed to define a space therebetween through which the gaseous atmosphere flows and a voltage source for applying a voltage between the first and second electrodes whereby an ionization current flows to the first electrode. A control mechanism illustratively in the form of a programmed microcontroller monitors the ionization current collected by the first electrode as the output signal of the sensor, to determine an increase therein as would be indicative of a halogen leak. Upon determining an increase of the sensor output signal above a predetermined difference, the control mechanism removes the energization from the halogen sensor whereby the ionization current is terminated and the life of the sensor extended. The control mechanism further causes an initial reading of the sensor signal to be taken and to be stored, whereby subsequent sensor readings may be compensated by subtracting the stored value therefrom to provide a compensated output indicative of the increased halogen level with respect to the initial background reading thereof. The relatively small halogen sensor output is amplified by a variable gain amplifier.

FIELD OF THE INVENTION

This invention relates to halogen gas monitors and, in particular, toapparatus including halogen gas sensors for processing the sensor outputsignal to determine the existence of a halogen leak with greaterreliability over an extended period to time.

DESCRIPTION OF THE PRIOR ART

Sensors such as that described in U.S. Pat. No. 2,550,498 of Rice takethe form of an electrical discharge device for receiving a sample of anatmosphere suspected of containing a concentration of a substance to bedetected and comprising cathode and anode elements for producing andcollecting ions. The collected ions produce from one of these electrodesa current which varies with the concentration of the substance to bedetected.

One common use of such electrical discharge devices is as sensors withinhalogen leak detectors to detect the leakage of halogens and their gascompounds. In order to detect widely varying levels of concentration ofsuch substances, the prior art halogen leak detectors have includedprovisions for adjusting the sensitivity of the sensor in order toextend the useful range. Such detectors have ranges of sensitivity whichlimit their use to the detection of leak rates within a limited span ofleak rates. Thus, a halogen leak detector having a sensitivity adaptedfor measuring relatively large leak rates of halogen compounds on theorder of 10⁻³ cc./sec. into a particular region, could be altered onlywith difficulty to increase its sensitivity so as to detect accuratelyleak rates of halogen compounds on the 10⁻⁹ cc./sec. into the sameregion. Typically, halogen leak detectors have marginal stability whenoperating near the upper limits of their sensitivity as evidenced byfluctuations in their output readings.

Many prior art halogen leak detectors are portable and are carried toparticular site where a leak of a relatively high level of concentrationof halogens was suspected to be present. However, applications havearisen such as in the refrigeration industry where it is desired tomonitor low rate halogen leaks into relatively large enclosures.Typically, the levels of halogen concentration in such relatively largeenclosures are quite small, requiring extremely sensitive and stableleak detectors.

U.S. Pat. No. 3,144,600 of Roberts discloses a halogen leak detectorcomprising an electrical discharge device as its sensor and employing anamplifier of variable gain for amplifying the output current of thesensor. In particular, the gain of the amplifier is set by a multi-rangecontrol switch to adapt the sensor for sensing corresponding multipleranges of levels of halogen concentration. In addition, the collectedcurrent as produced by the sensor in the presence of clean air iscompensated by applying an adjustable zeroing voltage of oppositepolarity to the output current of the sensor. More particularly, themagnitude of the zeroing voltage is adjusted over a range sufficient tonull the sensor output even when it is operating in its highest range ofsensitivity, i.e. when the multi-range control switch is adjusted toimpart the least degree of attenuation so as to sense relatively smallconcentrations of halogen compounds.

U.S. Pat. Nos. 2,996,661 of Roberts discloses the adjustment of leakdetectors for varying levels of concentration by controlling the flow ofthe atmosphere to the detector through use of a variable orifice. U.S.Pat. No. 3,875,499 of Roberts discloses the use of such a variableorifice in combination with a combined multi-range switch as wouldaffect the gain of a sensor output amplifier and also would variably seta selected orifice to permit a corresponding flow to the sensor.

U.S. Pat. No. 3,065,411 of Roberts further discloses a halogen leakdetector capable of indicating both the current level and the relativemagnitude of the change in the detected concentration of halogencompounds. A first circuit is responsive to the collected current to beset into damped oscillation by a change of the collected current. Thedamped oscillation is in turn applied to a control circuit having athreshold level. Oscillation above that threshold level will dispose thecontrol circuit to its conducting condition. Further, the first circuitincludes means for changing the amplitude of the oscillations in orderto accommodate sensing halogen compounds of varying concentrations.

U.S. Pat. No. 3,076,139 of Roberts relates to a halogen leak detectorparticularly adapted to sense changing concentrations of halogencompounds, as well as to respond only to sudden changes in the level ofhalogen concentration. An RC coupling circuit is connected between asensor as described above and an amplifier, which drives a leakindicating means. The RC coupling circuit repeatedly discharges itsinput signal, zeroing in effect the sensor and permitting a new sensingof the halogen compounds. A multi-position switch is provided to connecta selected capacitor from a plurality of available capacitors to form acorresponding RC coupling circuit for each of the plurality of ranges ofhalogen concentration to be sensed.

U.S. Pat. No. 3,363,451 of Roberts discloses a halogen leak detectorwherein a capacitor is charged by a variable biasing circuit and acurrent derived from its sensor to the level of the detected halogenconcentration. The capacitor is in turn connected to a control circuithaving a threshold level, which may be exceeded by the output of thecharged capacitor to energize a leak indicating means. The variablebiasing circuit includes a potentiometer which is adjusted in accordancewith the desired range of halogen concentration to be detected. Afurther sensitivity switch is provided to couple a battery to extend therange of balance control of the potentiometer in order to accommodatehigher levels of current and thus higher levels of halogenconcentration.

As evident from the above discussion of the prior art, such halogen leakdetectors were primarily portable devices not particularly adapted forextended monitoring applications of a single environment, where it wouldbe particularly desired to sense relatively low levels of halogenconcentration. It was contemplated that such portable detectors would beused with an operator continually present to set the desired range ofhalogen concentration to be detected by manipulating a multi-rangeswitch, while observing a suitable leak detecting means such as a meter.When a suitable mid-range indication was provided on the meter, theoperator knew that the correct switch setting had been achieved. Such aportable halogen leak detector is described in a service manual entitled"The Ferret® Leak Detector (type H25)" published by General Electric.The H25 leak detector uses an integrator to continually eliminatebackground steady-state signals from its sensor. In an application ofextended use of a halogen leak detector as is contemplated by thisinvention, such an integrator type of circuitry would continually zeroany small incremental leaks in a particular enclosure and would not beable to sense the accumulation of such small leaks.

The halogen sensors in the form of an electrical discharge device arerelatively expensive. The life of such sensors is relatively limitedrequiring frequent replacement. Experience with that halogen sensormanufactured by Yokagowa Corp. under model No. 66l4K11G1 has shown it tohave a life of approximately 1500-1800 hours. The collector/cathodeelements of such electrical discharge devices are coated with rare earthmetals and tend to deteriorate rapidly during sustained collection ofthe ion stream as occurs in the presence of halogen gases. Inapplications wherein such a halogen sensor and its leak detector areused to monitor halogen leaks within a given enclosure for relativelylong periods of time, a halogen leak may occur and is accordingly sensedby the halogen sensor for a relatively long period of time until anoperator may intervene to re-set, re-zero or otherwise disable thehalogen sensor. During such a relatively long period, thecollector/cathode element of the sensor is continually bombarded by theincreasing level of ions due to the presence of the halogen. Suchextended use quickens the deterioration of the collector/cathodeelements and therefore the life of such halogen sensors.

SUMMARY OF THE INVENTION

It is therefore an object of this invention to provide a new andimproved halogen monitoring apparatus as is capable of automaticoperation without operator intervention, thus permitting this apparatusto be used unattended to monitor halogen leaks in a particular enclosurefor extended periods of time.

It is a further object of this invention to provide a new and improvedhalogen monitoring apparatus for the sensing of halogen leaks in whichthe life of its halogen sensor is significantly extended.

It is another object of this invention to provide a new and improvedregulating circuit for a halogen sensor, which is capable ofcompensating for residual levels of halogen in a particular enclosure.

It is a still further object of this invention to provide a new andimproved halogen monitoring apparatus which is capable of initiallytaking a reading of the residual or initial level of halogen within aparticular enclosure and of compensating or subtracting that level fromfurther halogen measurements.

It is a still further object of this invention to provide a new andimproved halogen monitoring apparatus which is capable of automaticallysetting the sensitivity level of its sensor in a selected range from aplurality of such ranges.

It is another object of this invention to provide a new and improvedhalogen monitoring apparatus which is capable of providing a leakmanifestation indicative of a selected increase in the level of halogenconcentration.

In accordance with these and other objects of this invention, there isdisclosed halogen monitoring apparatus including a halogen sensor of thetype described with first and second electrodes disposed to define aspace therebetween through which a gaseous atmosphere to be monitoredflows, and a voltage source coupled to apply a voltage across the firstand second electrodes, whereby an ionization current flows between theelectrodes. The life of the sensor is extended by a control circuit asillustratively includes a programmed microcontroller for sensing anincrease in the ionization current and, if greater than a selectedlevel, for causing the voltage source to remove or reduce the voltagetherebetween to terminate the ionization current flow and thus extendthe life of the halogen sensor.

In a further aspect of this invention, the halogen monitoring apparatusincludes a memory and a control mechanism illustratively in the form ofa programmed microcontroller for initially taking a first reading of thesensor signal as is indicative of a background or steady state level ofthe halogen gas within an enclosure to be monitored and for storing thatbackground level signal in the memory to be used as a compensatingsignal to be subtracted from further readings of the sensor signal toprovide a compensated value indicative of the increase in the level ofhalogen concentration within the monitored enclosure.

In a still further aspect of this invention, the amplitude of the sensorsignal is relatively low and is amplified by a variable gain sensoramplifier. The gain of the sensor amplifier is set by initially settingthe gain to a relatively low value and thereafter increasing it untilthe output of the amplifier reaches a predetermined level and,thereafter, decreasing the amplifier gain.

In an illustrative embodiment of this invention wherein the control ofthe halogen monitoring apparatus is carried out by a programmedmicrocontroller, the apparatus includes an analog-to-digital (A/D)converter coupled to receive the output of the sensor amplifier. Whenthe A/D converter overflows, the gain of the sensor amplifier is reduceda discreet amount or to the next lower setting, whereby the output ofthe A/D converter is set at a mid-level output.

In a further aspect of this invention, the halogen monitoring apparatusprovides an indication of a halogen leak by determining an increase inthe level of halogen concentration. In particular, an increase in thegain of the sensor amplifier as well as an increase in the sensor signalare determined and if greater than a predetermined difference orincrease, there is an indication of a leak. The monitoring apparatus maybe set to measure a selected one of a range of halogen increases ordifferences, whereby the sensitivity of the monitoring apparatus may becorrespondingly set.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects and advantages of the present invention willbecome apparent by referring to the following detailed description andaccompanying drawings, in which:

FIG. 1 is a diagrammatic drawing of a halogen monitoring apparatus inaccordance with teachings of this invention;

FIGS. 2A to 2D, when assembled as shown in FIG. 2E, are detailedschematic drawing of the halogen monitoring apparatus as shown in FIG. 1

FIGS. 3A to 3F are flow diagrams of the program executed by thatmicrocontroller as shown in FIG. 2D.

FIGS. 4A and 4B are diagrammatic drawings respectively of a further,preferred embodiment of the halogen sensor and its related temperatureregulation circuit, and of the halogen monitoring apparatus as wouldinclude a programmed microcontroller and variable gain amplifier; and

FIGS. 5A to 5C are flow diagrams of the program executed by thatmicrocontroller as shown in FIG. 4B.

DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference to the drawings and in particular to FIG. 1, there isshown a halogen monitoring apparatus 10, particularly adapted to monitorthe atmosphere within an enclosure to detect the occurrence of halogenleaks in accordance with the teachings of this invention. The monitoringapparatus 10 of this invention differs from the prior art which istypically a portable device as is brought to a particular area where aleak is suspected. In an illustrative use of this invention, the halogenmonitoring apparatus 10 is disposed in an enclosure where there aredisposed a number of compressors of the type as used for large,commercial refrigerators. Such compressors leak at low rates theirrefrigerant which comprises halogens or compounds thereof. If the leakscontinue over a long period of time, a considerable amount of therefrigerant will be lost. The refrigerant is expensive, and there may bealso spoilage of the refrigerated product, e.g., food. The halogenmonitoring apparatus 10 of this invention is particularly adapted tomonitor such environments and, in particular, for sensing relativelysmall concentrations of, or leak rates of halogen gases. If the sourceof the halogen leaks, e.g., compressors, is disposed in an enclosurewith a relatively efficient flow of air therethrough, as would tend todissipate the leaked halogen, the halogen monitoring apparatus 10 wouldin effect monitor the leak rate. On the other hand, if the enclosure issealed, the leaked halogen would tend to build up and the halogenmonitoring apparatus 10 would tend to provide an indication of theaccumulated concentration of halogen leaked into such a sealedenclosure. As will be explained, the halogen monitoring apparatus 10 iscapable for operation over relatively long periods of time, if notcontinuous operation, whereby halogen leaks are immediately detected sothat appropriate remedial steps may be taken quickly to repairimmediately the leaking compressors.

As shown in FIG. 1, the halogen monitoring apparatus 10 includes aheater regulator 40, which in turn comprises a halogen sensor 12,adapted and operated to detect halogen leaks in accordance with theteachings of this invention. The halogen sensor 12 is shown in detail inFIG. 2B as including a heater/anode element 13 and a collector/cathodeelement 14 spaced therefrom and enclosed by an electrical shield 15. Inan illustrative embodiment of this invention, the halogen sensor 12 maytake the form of that sensor manufactured by Yokagowa Corp. under theirdesignation 66l4K11G1. The collector/cathode element 14 thereofillustratively takes the form of a rod suspended in a powdered-alkalimetal core housed in a concentric platinum tube. The tube and rod areconnected by a welded platinum strip, thus keeping rod and tube at thesame potential. The heater/anode element 13 may illustratively take theform of a coiled-wire heater wrapped on four ceramic posts and disposedabout the aforementioned rod/tube assembly. Illustratively, a voltage inthe order of 180 volts is imposed between the heater/anode element 13and its collector/cathode element 14. Approximately 10 volts is appliedacross the heater/anode element 13, whereby current in the order of 4amps is directed therethrough and the temperature of the sensor 12 israised to approximately 900° C., causing a small current to flow in therod of the collector/cathode element 14. This small current flow, whichis due to ionization of the core material, increases linearly to auseful limit proportioned to the level of halogen in the gas or gaseousatmosphere passing through the sensor 12. Beyond this limit, theincrease in current is extremely non-linear and excessive increases inhalogen in the circulated atmosphere only serve to shorten the life ofthe halogen sensor 12. The current collected in the collector/cathodeelement 14 and appearing as an output signal of the halogen sensor 12 ona sensed current line 68 is rather small being in the order of 1-100 μA.

Referring now to FIG. 1, the collected current in the collector/cathodeelement 14 (see FIG. 2B) provides the output signal of the halogensensor 12 (and its heater regulator 40) and is applied via the sensedcurrent line 68 to a sensor amplifier 74, which amplifies the sensorsignal and applies same via an output line 58 to a sample and holdcircuit 56. In turn, the sensor signal in an analog form is applied toan analog-to-digital (A/D) converter 54, which converts and applies thedigital sensor signal to the microcontroller 62. The gain of the sensoramplifier 74 may be varied by an automatic gain setting circuit 70 and,in particular, set at a selected one of a plurality of gain or tapsettings, corresponding to various ranges of sensitivity of the sensor12. As illustrated in FIG. 1, the gain setting of the circuit 70 iscontrolled by the programmed microcontroller 62.

As shown in FIG. 1, power is supplied to the heater regulator circuit 40and its sensor 12 by a power supply 20. In turn, a typically available120 VAC is applied to a surge protection and line filtering circuit 16,which in turn energizes the power supply 20. The various operations andfunctions of the halogen monitoring apparatus 10 are controlled by aprogrammed microcontroller 62, the program being illustrated in FIGS. 3Ato 3F. In particular, the programmed microcontroller 62 senses an outputfrom the sensor 12 indicative of the presence of a certain level ofhalogen gas. When a halogen leak has been detected, the microcontroller62 closes a power control switch 24 to thereby shortout the 180 voltsprovided by the power supply 20 and to remove the heater/anode supplyvoltage from the sensor 12. As will be explained in detail later, theremoval of the heater/anode supply voltage from the sensor 12 preventsthe rapid deterioration of its collector/cathode element 14 due to theion bombardment that occurs in the presence of halogens, whereby thelife of the sensor 12 is significantly prolonged. As a result, thehalogen monitoring apparatus 10 is capable of continuously monitoringhalogen leaks within the enclosure. Further, the current drawn throughthe heater/anode element 13 of the sensor 12 is applied as an analogsignal to a heater current analog-to-digital (A/D) converter 44, whichconverts this analog signal to a corresponding digital signal to beapplied to the microcontroller 62.

In a further aspect of this invention as shown in FIG. 1, an automaticzeroing circuit 78 is provided to initially take a reading of the sensor12 as would be indicative of a steady state or background level of thehalogen in an enclosure to be monitored. The background sensor signal isstored in a non-volatile memory within the circuit 78 and is subtracted,as will be explained later, from the current sensor signal to provide acompensated signal as indicative of an increase of the current halogenlevel over the original background level thereof. Further, themicrocontroller 62 is coupled to a transceiver 60 and adapts themicrocontroller 62 for the transmission and reception via a serialcommunication port 86 of data messages to and from a main controller(not shown). In this fashion, a plurality of the halogen monitoringapparatus 10 may be employed at a plurality of remotely disposedrefrigerators to detect halogen gas leakage from their compressors andto report such leakage to the main controller.

As shown in FIG. 2A, energization in the illustrative form of 120 voltsAC is applied to terminals TB 11 and 12 of the surge protection and linefiltering circuit 16. The output of circuit 16 is applied to the powersupply 20 including a transformer 18. In particular, the output ofcircuit 16 is applied to a primary winding 18a of the transformer 18,being inductively coupled to each of a plurality of secondary windings18b, 18c, 18d and 18e. The output of the secondary winding 18b is fullwave rectified to provide 10 volts DC to the heater regulator 40 asshown in FIG. 2B, whereby the current passing through the heater/anodeelement 13 and therefore its temperature may be accurately regulated.See U. S. Pat. No. 3,912,967 of Longenecker. Briefly, the resistancepresented by the heater/anode element 13 is sensed and is used toselectively close the transistor Q3 when the resistance of the element13 is less than a desired value and to open the transistor Q3 when theresistance exceeds this value as would establish the desired temperatureof the halogen sensor 12.

The output of the secondary winding 18c of the power supply 20 is halfwave rectified and is applied to the power control switch 24, whichcontrols the application of the relatively high voltage, e.g., 180volts, between the heater/anode element 13 and the collector/cathodeelement 14 of the halogen sensor 12 and, in particular, the voltageapplied to the point of interconnection of the resistors R21 and R22 ofthe heater regulator circuit 40. As will be explained, a control signalis developed by the microcontroller 62 as shown in FIG. 2D and appliedvia control line 25 to a sensor collector/anode over current protectioncircuit 27, which in turn provides an output to the power control switch24 and in particular to its transistor Q1, which as will be explainedremoves (short circuits) the high voltage as applied between theelements 13 and 14 of the halogen sensor 12. Briefly, themicrocontroller 62 under the control of its program as shown in FIGS. 3Ato 3F, responds to an output on the sensed current line 68 to render thetransistor Q1 conductive, whereby the high voltage is removed and thelife of the halogen sensor 12 extended.

The voltage appearing on the secondary winding 18d of power supply 20 isapplied to a brown-out protection circuit 30, which prohibits themicrocontroller 62 from initiating the execution of its program if the120 volts AC applied to the surge protection and line filtering circuit16 should decrease as under brown out conditions. Almost immediatelyafter application of 120 volts AC to the surge protection and linefiltering circuit 16, a voltage comparator 28a responds to the 2.5 voltson its inverting input pin 8 as derived from the voltage referencecircuit 22, whereby the open collector output of the voltage comparator28a is forced to ground, which is turn forces the RESETpin 4 of themicrocontroller 62 to reset until the voltage appearing at the point ofinterconnection between resistors R14 and R15 rises to at least 7.5volts. At that point, the voltage at the non-inverting input of thevoltage comparator 28a exceeds the 2.5 volts at the inverting terminalof the voltage comparator 28a, and the open collector output switchesfrom being grounded to a floating output, which is pulled up to 5 voltsvia resistor R18, thus forcing the RESETpin of the microcontroller 62high, which hence initiates the microcontroller 62 into executing itsinstructions.

As shown in FIG. 2A, a RESET circuit 32 is provided to ensure that themicrocontroller 62 is initially RESET when power first comes on. As willbe explained, a watchdog circuit 34 is provided to prevent the RESETcircuit 32 from further preventing the microcontroller 62 from beingRESET. The watchdog circuit 34 in the form of a voltage comparator 28cis coupled to pin 8 of the microcontroller 62 to monitor the properexecution of the program by the microcontroller 62. As long as theprogram continues to be executed properly by the microcontroller 62, itsRD pin 8 regularly applies a stroke pulse signal to the noninvertinginput of the voltage comparator 28c providing 0 output pulses whichprevent microcontroller 62 from being RESET. The output of the voltagecomparator 28c is in turn coupled to a RESET circuit 32 and inparticular to the point of interconnection of a capacitor C14 and aresistor R32 which form a timing circuit 36. The timing circuit 36 has atime constant of 47 msecs., and the voltage across the capacitor C14 isapplied to the inverting input of a voltage comparator 28b. A voltagedivider comprised of the resistors R29 and R30 applies 1/2 of the outputof the 5 volt regulator Q5 to the non-inverting input of the voltagecomparator 28b as a reference level for the reset circuit 32.Approximately 32 msecs. after power is initially applied to the surgeprotection and line filtering circuit 16, the capacitor C14 is chargedto a level exceeding that of the reference voltage divider, whereby theoutput of the voltage comparator 28b would be forced to ground, andhence cause a reset of the microcontroller 62. After the microcontroller62 has been initially reset upon power-up and has started to execute itsprogram, the microcontroller 62 outputs the strobe pulse from the RDpin8 indicating that the program is being properly executed by themicrocontroller 62. In particular, the strobe pulse regularly dischargesthe capacitor C14 at least every 32 msecs., thereby preventing the resetcircuit 32 from resetting the microcontroller 62 while its program isbeing properly executed.

As explained above, the output of the halogen sensor 12 is responsive tothe ions collected by the collector/cathode element 14 and is appliedvia the sensed current line 68 to a variable high gain amplifiercomprising an automatic gain setting circuit 70 and the sensor amplifier74. A high gain amplifier is required because the output current of thehalogen sensor 12 is relatively small in the order of 1-100 mamps. Inparticular and referring now to FIG. 2C, the sensor output is applied toan operational amplifier 76a whose output is in turn applied to a secondoperational amplifier 76b. A feedback circuit as would control the gainof the operational amplifier 76a is formed by the automatic gain settingcircuit setting 70, which takes the form of an analog multiplexer 72,using the generic industry standard designation 4051. As will beexplained later, the analog multiplexer 72 operates under the control ofthe microcontroller 62 to short out a selected portion of a voltagedivider comprised of resistors R43 to R50 to thereby set the gain of theoperational amplifier 76a. By so adjusting the gain of the operationalamplifier 76a, various ranges of current levels of the halogen sensor 12and thereby various ranges of halogen compound densities may be detectedand accurately measured. The selectively amplified output of theoperational amplifier 76a is applied further to the operationalamplifier 76b to provide the output of the sensor amplifier 74 on inputline 58. The output from the amplifier circuit 74 corresponds to rangesof halogen leaks of 1×10⁻⁴, 1×10⁻⁵, 1×10⁻⁶, and 1×10⁻⁷ cc/seccorresponding respectively to the tap settings 7 and 6, 5 and 4, 3 and2, and 1 and 0 of the analog multiplexor 72 as selected under thecontrol of the microcontroller 62. In this embodiment, each rangecorresponds to two tap settings. It is now apparent that the halogenmonitoring apparatus 10 differs from the prior art in that continuedmonitoring by an operator to select the size of the halogen leak to bedetected by actuating a mechanical rotary switch to select the variousgains of its sensor amplifier circuit is no longer needed in that thisapparatus 10 employs an automatic gain setting circuit 70 under thecontrol of the microcontroller 62.

The automatic zeroing circuit 78 is incorporated into the halogenmonitoring apparatus 10 to eliminate those steady-state signals from thehalogen sensor 12 as may be due to the operation of the sensor 12 itselfor to the presence of residual or background amounts of halogencompounds in the enclosure being monitored. In a contemplatedapplication of the halogen monitoring apparatus 10 where it would beused to continuously monitor halogen leaks within an enclosure forrelatively prolonged periods of time, the automatic zeroing circuit 78under the control of the microcontroller 62 measures the level of thebackground steady-state signal as originate from the halogen sensor 12and serves to store and continuously subtract that level from thehalogen sensor output signal as applied to the sensed current line 68.In particular, the automatic zeroing circuit 78 includes an electricallyerasable digitally controlled potentiometer (EEPOT) 80 such as thatmanufactured by XICOR Inc. under their model number X9103P. The EEPOT 80comprises a non-volatile memory having an extended memory life, e.g.,100 years, for storing a signal indicative of the position of its wiperarm as corresponds to the initially measured steady-state signal of thehalogen sensor 12. That zeroing output is applied via an operationalamplifier 82 to be added in series with the halogen sensor output to thenoninverting input of the operational amplifier 76a.

Referring now to FIG. 2D, a dipswitch 64 is connected to the inputs DB0to DB7 of the microcontroller 62 and serves to provide operator inputthereto. In particular, a run/test switch 6 of the dipswitch 64 permitsthe microcontroller 62 to operate in a selected one of a TEST or RUNmode. Initially, the operator sets switch 6 to operate the apparatus 10in its TEST mode, wherein the halogen monitoring apparatus 10 takes aninitial measurement of the background level signal outputted by thehalogen sensor 12 and, if the background halogen level is reasonably low(no leak present), the operator changes the position of switch 6 of thedipswitch 64, whereby the microcontroller 62 causes the apparatus 10 tooperate in its normal or RUN mode. In the RUN mode, the backgroundsignal is stored in the EEPOT 80 and is subtracted from the currentoutput signal of the halogen sensor 12. Thus, the microcontroller 62will continuously, in its run mode, zero out the current signal from thehalogen sensor 12 with the stored background steady-state signal asstored in the EEPOT 80 until recalibration becomes necessary as wouldoccur with the installation of the apparatus 10 and its halogen sensor12 in a new enclosure or the replacement of the halogen sensor 12.

The analog output of the sensor amplifier 74 is applied via the inputline 58 to an IN pin 3 of the sample and hold circuit 56. In turn, theanalog output from its OUT pin 5 is applied to an input A0 pin of theA/D converter 54, which converts the inputted analog signal asindicative of the variably amplified halogen sensor output into acorresponding digital signal and applies this digital signal from itsoutput S0 pin 5 to the T1 pin 39 of the microcontroller 62.

The A/D converter 54 is a 4-channel input device and also serves tomonitor the power supply levels of the 180 volts, 5 volts and either ofthe +12 or -15 volts as are outputted from the power supply 20. In arecognized fashion, the microcontroller 62 applies to the CSpin 6 of theA/D converter 54 a channel select signal, whereby a selected one of thefour input signals as are applied to the A0 to A3 pins is converted toits digital signal and is input to the microcontroller 62.

In normal operation of the halogen sensor 12, the current flowingthrough its heater/anode element 13 is in the order of 1-4 amps and ispicked off from the TB33 terminal and applied to the heater currentanalog to digital (A/D) converter 44 and, in particular, to its timer 46as shown in FIG. 2B. The timer 46 operates as a counter to output asignal of a frequency proportional to the current outputted from theheater/anode element 13. The output of the timer 46 is applied via anopto-isolator 48, which serves to protect the microcontroller 62 fromthe relatively large signals present in the heater regulator circuit 40.The isolator output is applied via output line 50 and a transistor Q11(see FIG. 2D) to the P10 pin 27 of the microcontroller 62, whereby theheater current and thereby the operation of the halogen sensor 12 maybemonitored.

It is contemplated that a plurality of the halogen monitoring apparatus10 and their halogen sensors 12 may be disposed at a like plurality ofremote stations for monitoring halogen leaks thereat. Each of thehalogen monitoring apparatus 10 has the capability of communicating witha centrally disposed main controller in the illustrative form of anIBM-PC/XT® or compatible microcomputer. The main controller is capableof periodically communicating or polling each of the remotely positionedhalogen monitoring apparatus 10. As shown in FIG. 2D, pins P14 to P16and T0 of the microcontroller 62 are coupled to the transceiver 60 forreceiving and transmitting via the port 86 messages to the maincontroller. The transceiver 60 may illustratively take the form of thatchip manufactured by Texas Instruments under the designation 75176 orthe equivalent chip made by Fairchild Semiconductor and is capable oftransmitting digital data at a baud rate of 1200 bits per second usingthe format of the "BISYNC"® protocol. As will be explained in detailbelow, after a halogen leak has been detected, a status register withinthe microcontroller 62 is changed to reflect the detected leak. Uponbeing polled by this main controller, the microcontroller 62 responds bytransmitting a "status byte" including various data indicative of theoperation of the halogen monitoring apparatus 10, as well as whether aleak has or has not been detected.

Each of the halogen monitoring apparatus 10 is coupled in parallel by asingle communication line with the main controller, which poles each ofthe halogen monitoring apparatus 10 by addressing a particular halogenmonitoring apparatus 10 with a unique five bit address, whereby thecorresponding microcontroller 62 is enabled to interrogate its memoryand to formulate and transmit a return message to the main controllervia its transceiver 60. The dipswitch 64 provides a means in the form ofits switches 1-5 for entering into the microcontroller 62 its uniqueaddress, whereby the main controller may communicate with thatparticular apparatus 10.

When the microcontroller 62 senses that the halogen sensor 12 hasdetected a leak as will be explained below, the microcontroller 62outputs on its P13 pin 30 a signal that actuates a light indicator 88 toflash at an illustrative rate of 1Hz. As was explained above, thehalogen sensor 12 is disabled by the microcontroller 62 after sensing ahalogen leak. A flashing light indicator 88 indicates that thisparticular halogen monitoring apparatus 10 and its halogen sensor 12 arein an off state and waiting for a service person to find and correct theleak and to reset the main controller, which will in turn reset thecorresponding microcontroller 62. In addition, P23 pin 24 of themicrocontroller 62 is coupled to an output switch 84 in the form of aFET Q12, which is operated to turn on when a leak is detected. Asindicated in FIG. 2D, the FET Q12 connects terminals TB21 and 22together, which may be employed to actuate a further alarmmanifestation. Upon receiving the return message from the halogenmonitoring apparatus 10, the main controller may actuate a beeper toprovide a warning manifestation of a detected halogen leak. In addition,the main controller saves all status signals or flags indicative of thedetected halogen leak on a suitable memory such as a floppy disk, bubblememory, or EAROM. In turn the main controller may through suitableconnections over conventional telephone wires place calls to appropriatemanagement and service personnel to inform them that a leak has beendetected.

FIG. 3A shows a flow diagram of a main control program 100 as executedby the microcontroller 62 to control the various functions and processesof the halogen monitoring apparatus 10, whereas the remaining FIGS. 3Bto 3F show various subroutines 200, 120, 198, 116 and 104 as areselectively called from the main control program 100. Referring now toFIG. 3A, the microcontroller 62 enters the main control program 100after a high signal has been applied to its RESETpin 4 (see FIG. 2D) asis indicative that an input voltage has been applied to the surgeprotection and line filtering circuit 16 to execute its firstinstruction 102, whereby the halogen sensor 12 is turned on by settingpin 29 of the microcontroller 62 and the control line 25 to a logic 0,which in turn turns off the transistor Q2 (see FIG. 2A) and thereby thetransistor Q1 of the power control switch 24. Thus, the 180 voltsderived from the power supply 20 is now applied between the heater/anodeelement 13 and the cathode/collector element 14 to actuate the halogensensor 12. In step 102, the light indicator 88 is also turned off,before step 104 effects a 3 minute warmup loop to allow the halogensensor 12 to stabilize its output current as applied to the sensedcurrent line 68. While in this 3 minute loop, the watchdog subroutine104, as shown in more detail in FIG. 3F, periodically provides a strobepulse to the watchdog circuit 34, whereby the timing circuit 36 isdefeated as explained above to thereby prevent the resetting of themicrocontroller 62. After the 3 minute warmup has been completed asdetermined in step 106, step 108 accesses the random access memory (RAM)of the microcontroller 62 to initialize the various flags to be used inthe course of the main control program 100. In particular, step 108 setsa flag zero (F0) flag to 1 in preparation for further steps in theprogram 100 and also sets the tap or gain setting of the analogmultiplexer 72 to its minimum gain setting, i.e., tap 7. Each time thatthe halogen monitoring apparatus 10 and its microcontroller 62 ispowered up, control will enter the main control program 100 at step 102and the program 100 will be reinitialized in step 108. Thus each timethat the program is powered up, the analog mutliplexer 72 will be set toits minimum gain, so that as will be explained later, the tap setting ofthe analog multiplexer 72 may be incremented until a predeterminedoutput is obtained from the sensor amplifier 74.

Next, step 110 accesses the inputs from the dipswitch 64 to read intothe microcontroller 62 its unique address as set by the switches S1-S5,to determine whether the halogen monitoring apparatus 10 is set in itsRUN or TEST mode as by switch S6, and to determine the sensitivity ofthe halogen sensor 12 as set by switches S7 and S8. As will be explainedbelow, the halogen monitoring apparatus 10 is capable of adjusting itssensitivity to sense only changes of a certain magnitude in the increaseof the current level from the halogen sensor 12 as a valid indication ofa halogen leak. The use of two switches S7 and S8 permits the setting offour different levels of sensitivity or magnitudes of change of thehalogen sensor output.

If step 112 determines that the halogen monitoring apparatus 10 is inits TEST mode as would normally occur at the installation of theapparatus 10 or recalibration of its halogen sensor 12, the program 100moves to the sequence of steps 162 to 174, which sets the delta flagto 1. The delta flag is set, as will be explained below in detail, inorder to enable the calling of the zeroing circuit subroutine 198,whereby the automatic zeroing circuit 78 and, in particular, its EEPOT80 may be initialized, i.e. the background level of the residual orsteady state halogen as sensed by the halogen sensor 12 is storedtherein. The delta test flag is used by the main control program 100 toinsure that when the run/test switch 6 of the dipswitch 64 has beenchanged from the test position to its run position and the program 100is operating therein, the zeroing circuit subroutine 198 will be calledonly a single time in order to initialize the EEPOT 80. In step 162, thedelta test flag is tested to indicate whether it had been previously setas would have occurred by a previous execution of step 166. If the deltatest flag has been set to 1, the program 100 returns to step 114; if notset as would occur if the apparatus 10 is in its TEST mode and this isthe first execution of the main control program 100, then step 166 setsthe delta flag to 1 and step 168 applies a 0 state signal to the pins 1and 2 of the EEPOT 80. Next, step 170 moves the output wiper arm Vw pin5 of the EEPOT 80 to its minimum position VL in preparation for thezeroing circuit subroutine 198. Thereafter, the main control program 100returns to step 114 and the steps 162 to 174 will not be re-executed inthat the delta flag is now set to 1.

Next, step 114 sets the channel select registers D1 and D0 within theA/D converter 54 to convert all of its four input channels and an analogto digital (A/D) subroutine 116 is called to convert the followinganalog input signals into corresponding digital signals: 1) theamplified sensor signal as input to the AO pin 10; 2) a scaled portionof the 180 volt power supply signal as input to Al pin 11 from the pointof interconnection of resistors R5 and R34; 3) a scaled portion of the 5volt power signal as applied to the A2 pin 12 from point ofinterconnection of the resistors R16 and R17 of the power supply 20; and4) the rectified +12 or -15 volt signals as applied to the A3 pin 13from the point of interconnection of the elements CR10 and VR3. Next instep 118, the pulses outputted by the heater current A/D converter areapplied to Pl0 pin 27 of the microcontroller 62 to be counted. Thefrequency of these pulses is proportional to the magnitude of thecurrent flowing through the heater/anode element 13. Next, the serialinput/output (I/O) subroutine 120, as will be explained in greaterdetail in FIG. 3C, is called if the main controller wants to receive orto modify the status registers as stored in the RAM of themicrocontroller 62.

Next in step 122, the flag zero (F0) flag is tested to see if the sensoramplifier 74 and the automatic gain setting circuit 70 have beeninitialized. If the F0 flag is still set (F0 flag=1) indicating that thegain tap of the analog multiplexer 72 has not been initialized after themost recent energization of the power supply 20, the main controlprogram 100 moves to step 124. In step 108 as previously executed, tap 7of the analog multiplexer 72 was initialized, i.e., is set so that thegain of the operational amplifier 76a is initially set at a minimumvalue. Now, step 124 examines the output of the A/D converter 54 todetermine whether it has overflowed, i.e., is greater than a 2.5 voltsmaximum input level. In many situations, where the enclosure to betested is substantially free of halogen gas, the main control program100 will proceed to increase by one tap setting the gain of the analogmutliplexer 72 each time that the step 126 is executed, from its minimumtap 7 until its 0 tap as indicative of the maximum gain, is set. Step124 continues to test whether the A/D converter 54 was overflowed and,if not, step 126 will increment the gain of the voltage comparator 76aby decreasing the tap setting, e.g. move the analog multiplexer 72 toits next lower tap number. Thereafter, step 128 will determine whetherthe analog multiplexer 72 is set at its maximum gain, i.e. its 0 tap,and, if not, step 138 stores an indication of the new tap value, e.g.tap 6, into a designated location within the RAM of the microcontroller62. Next, step 140 switches the setting of the analog multiplexer 72 tothe new higher tap setting. Step 142 initiates a wait period of 11 msecuntil the new tap output has been settled, before step 144 takes a"current" value of the output of the halogen sensor 12 and stores itinto a storage location of the microcontroller RAM known as "old value",before the program returns to step 110.

In this fashion, the control program 100 loops repeatedly through step126 until either the A/D converter 54 overflows as tested in step 124,or the analog multiplexer 72 is set at its minimum tap 0 correspondingto its maximum gain as decided in step 128. In that case, step 130actuates the analog multiplexer 72 to set its 0 tap for a maximum gainor maximum sensitivity of the halogen monitoring apparatus 10. Next,step 132 stores the indication that the analog multiplexer 72 is in its0 tap into the "original tap" location of the microcontroller RAM. Next,the "current" value or output of the halogen sensor 12, which was readinto the A/D converter 54 previously in step 116, is now set into the"original" value register of the microcontroller RAM, before step 136resets the F0 flag to 0, indicating that the analog multiplexer 72 hasnow been initialized. Thus, each time that the main control program 100is powered up and step 108 initializes the flags and, in particular,sets the F0 flag to 1 and disposes the tap gain of the analogmultiplexer 72 to its minimum gain value or tap value 7, the program 100will normally loop through step 126, whereby the tap of the analogmultiplexer 72 will be set incrementally to its minimum position 0 forthe maximum gain of the sensor amplifier 74. After the tap setting hasbeen so initialized, step 136 resets the F0 flag to 0. After the analogmultiplexer 72 has been so initialized and the F0 flag reset to 0, themain control program 100 will not again enter step 124, but will ratherbe directed to step 176 as will be explained.

If the F0 flag has not been reset and there is initially some level ofhalogen concentration within the enclosure, the tap of the analogmultiplexer 72 will not be reset to 0, but will be set to a particulartap setting 1 to 7 that will cause the A/D converter 54 to overflow assensed in step 124. If the A/D converter 54 does overflow, the maincontrol program 100 moves to step 146, which increments the tap settingby one to decrease the gain from that gain setting that caused the A/Dconverter 54 to overload. If the tap setting of the analog multiplexer72 is at its minimum setting of 7 and the A/D converter 54 is overflowedas determined in step 148, this is an indication of a leak, in that theconcentration of halogen exceeds the minimum sensitivity of theapparatus 10 and the main control program 100 moves to the leak controlportion 200 of the program, as will be explained with respect to FIG.3B. However, if the tap setting is less than 7, step 150 will set thistap setting into the "current" value location of the microcontroller RAMand will also set the "original" value of the tap setting to 0. As willbe apparent from the further explanation of the main control program100, "current" and "original" values of each of the tap settings of theanalog multiplexer 72 as well as the "current" and "original" values ofthe halogen sensor output are saved in corresponding locations withinthe RAM of the microcontroller 62 to permit determination of increasesof the halogen compound concentration levels as will be indicative of ahalogen leak. Next, step 152 effects a change of the tap setting of theanalog multiplexer 72 to its next lower gain setting, before step 154effects a delay or wait period until the setting change can becompleted. Next, step 156 loads the "old value" of the sensor outputinto the "original" value location of the microcontroller RAM, beforestep 158 determines whether the apparatus 10 is operating in its TEST orRUN mode. If in its TEST mode, the "current" value of the tap in step160 is moved to its "original" value. Thus, if the apparatus 10 isoperating in its TEST mode, the tap setting obtained in step 150, aswould be indicative of the quantitative or non-zeroed background levelof halogen gas, is saved in the "original" value location of themicrocontroller's RAM, whereby the "original" value of the tap settingas taken in the zeroing circuit subroutine 198 and stored in the EEPOT80, as will be explained, will be ignored to obtain a relative leakdetection with regard to present levels of halogen. If in the RUN mode,the main control program 100 moves directly to step 146 which resets theF0 flag indicating that the analog multiplexer 72 has been initialized.Thus if the program is in the RUN mode as would normally occur, the"original" value of the tap setting as would normally be 0,corresponding to a maximum gain of the sensor amplifier 74, will be setin the "original" value of the microcontroller's RAM, whereby in thefurther running of the main control program 100, current readings of thesensor output would be compensated with respect to the initially takenbackground level of the sensor output.

In the next loop of the main control program 100 after the F0 flag hasbeen reset to 0 in either of steps 136 or 146, step 122 will direct theprogram 100 to step 176, which determines whether the output of the A/Dconverter 54 has overflowed. If in the overflow state, step 189determines whether the tap setting of the analog multiplexer 72 is atits maximum tap setting of 7 and, if so, the main control program 100provides an indication of a leak and the program 100 moves to leakcontrol at 200, as will be explained. If not at tap setting 7, step 190increments the tap by one position and decreases accordingly the gain ofthe sensor amplifier 74. Step 191 effects a change of the tap to itsnext higher setting, and step 192 effects a delay to permit the settingto be completed, before the program 100 returns to step 110.

On the other hand, if the A/D converter 54 has not overflowed after theF0 flag has been reset, the main control program 100 now determineswhether there has been a halogen leak as by comparing variously thechange of the "current" values and "original" values of the tap settingsof the analog multiplexer 72 and the output signals of the halogensensor 12. In a significant aspect of this invention, the halogenmonitoring apparatus 10 is capable of selecting different sensitivitiesto halogen compounds in the enclosure, i.e. smaller or larger changes ofhalogen compound concentrations with a particular enclosure may beselectively set for the apparatus 10 to provide an indication of ahalogen leak. To this end, sensitivity switches 7 and 8 of the dipswitch 64 may be variously set in any of four different combinationsthat corresponds to a change or "adder" from the original analogmultiplexer 72 tap position by 1, 3, 5 or 7 tap positions.

First, in step 178, the "current" tap position is compared to the"original" value thereof plus the above sensitivity "adder" as enteredby the dip switch 64 and, if greater or equal to the original tapposition plus the sensitivity "adder", then step 180 determines whetherthe "current" value is not equal to the original value of the tapsetting plus the sensitivity "adder", as would indicate that the"current" value of the tap setting is greater. If greater, the maincontrol program 100 provides an indication of a leak and moves to theleak control at location 200. On the other hand, if the "current" valueof the tap setting is equal to the original value of the tap settingplus the sensitivity adder, step 182 performs a further test of whetherthe "current" value of the halogen sensor output is greater than the"original" value of the halogen sensor output and, if so, the maincontrol program 100 provides an indication of a leak and also moves tothe leak control location 200.

Returning again to step 178, if the "current" value is not greater thanthe "original" value of the tap setting plus the sensitivity "adder",the main control program 100 moves to step 194 to determine whether theoutput of the A/D converter 54 is less than 1/4 full scale thereof and,if not or greater, the "current" value within the "wait registers" W0and W1 is decremented in step 184 by 1 to a minimum of 0. The "waitregisters" are used to indicate that a leak indication has occurred andthat a wait period has expired, noting that the halogen monitoringapparatus 10 requires that three successive halogen leak indications andwait periods occur before a valid halogen leak and a warning signalthereof is provided. On the other hand, if the output of the A/Dconverter 54 is less than 1/4 full scale, step 196 decrements the gainby one tap to give sensor amplifier 74 maximum sensitivity, beforereturning to step 184. Next, step 186 tests the dip switch 64 todetermine whether the main control program 100 is operating in its RUNmode and, if still in its TEST mode, the main control program 100returns to its step 110. On the other hand if in its run mode, step 188tests whether the delta test flag is set to 1 as would indicate that theoperator has just set the run/test switch 6 of the dipswitch 64 fromTEST mode to its RUN mode and, if set, the zeroing circuit subroutine198, as will be further described with respect to FIG. 3D, is called. Aswill be explained later, the zeroing circuit subroutine 198 causes theEEPOT 80 to output the initial steady state signal, which cancels outthe background level of halogens within the enclosure and stores asignal indicative of the position of its wiper arm in a non-volatilememory. That stored value of the wiper arm will be applied to theinverting input of the operational amplifier 82, which inverts andmultiplies by 2 the voltage from the EEPOT 80 and applies that signal tothe inverting input of the voltage comparator 76a. As will be explained,the zeroing circuit subroutine 198 will reset the delta test flag to 0,whereby the background level of the halogen sensor 12 will be calculatedonly at installation time, initially stored into the non-volatile memoryof the EEPOT 80 and will not be reset until the halogen sensor 12 isreplaced and/or the halogen monitoring apparatus 10 is againrecalibrated by the operator.

Thus, it is seen that the main control program 100 and in particular itssteps 176 to 196 serve to provide an indication of a halogen leak underthe following conditions:

(1) when the "current" value of the tap position of the analogmultiplexer 72 is greater than the "original" value of the tap positionplus the sensitivity adder as entered on switches 7 and 8 the dip switch64;

(2) when the "current" value of the tap position is equal to the"original" value of the tap position plus the sensitivity adder and the"current" value of the halogen sensor output exceeds its "original"value; and

(3) when the output of the A/D converter 54 overflows and the gain tapof the analog multiplexer 72 is set at its minimum gain position 7.

Referring now to FIG. 3B, leak control location 200 is shown in detail.Location 200 is entered when a predetermined change in the output of thehalogen sensor 12 has been detected in accordance with that criteria asexplained above. The leak control location 200 verifies whether such achange as may be indicative (or not) of a leak are valid or spurious. Ina significant aspect of this invention, when a leak change is soprovided, step 202 removes the 180 volts as applied between thecollector/cathode element 14 and the heater/anode element 13 of thehalogen sensor 12 by setting the P12 pin 29 of the microcontroller 62 toa logic high as applied by the control line 25 to turn on transistor Q2,the isolator 26 and thus the transistor Q1, whereby the 180 volts asapplied across the output of the secondary coil 18c is shorted out andthe halogen sensor 12 is essentially deenergized. As a result, thecollector/cathode element 14 no longer collects its current as wouldotherwise significantly shorten the life of the halogen sensor 12. Next,step 204 reads the dip switch 64 to determine which position switch 6 ofthe dipswitch 64 is in and thus whether the halogen monitoring apparatus10 is in its TEST or RUN mode. If in the RUN mode, the program moves tostep 206, which increments by one a counter formed by the W0 and W1 waitregisters within the microcontroller RAM. Each time that a leak isconfirmed at location 200 when in the RUN mode, this wait counter willbe incremented by 1. Next, step 208 tests whether the wait counter hasbeen incremented three times as would qualify for a verified leak asopposed to a nuisance or spurious indication. If the wait counter hasnot been incremented to three, the program moves to step 210 to set theleak wait mode flag, as will now be available to be transmitted to themain controller informing it that the halogen monitoring apparatus 10 isin the process of testing whether a valid halogen leak has occurred. Atthis point in time, a five minute timing period occurs. Initially, instep 212, a three minute waiting period is commenced during which theserial I/O subroutine 120 is called in order to permit communicationbetween this halogen monitoring apparatus 10 and the centrally disposedmain controller, and the watchdog subroutine 104 as shown in FIG. 3F iscalled to continuously reset or refresh the watchdog circuit 34, wherebythe microcontroller 62 will not be reset. At the end of this threeminute period, step 214 turns off the transistor Q1 by permitting theP12 pin 29 of the microcontroller 62 to go high, whereby the halogensensor 12 is turned back on for a two minute warm up period to permitits operation to settle before taking the next A/D sample of the halogensensor 12. Further, step 216 calls the serial I/O subroutine 120 and thewatchdog subroutine 104. After the two minute warm up period, step 218resets the leak wait mode flag indicating that the waiting period isover and the program returns to step 110 of the main control program100.

If step 208 tests the wait counter registers W0 and W1 and determinesthat three leak detections and corresponding wait period have occurred,there is a valid indication of a halogen leak within the enclosure andthe program moves to step 220, which clears the wait counter registersW0 and W1 to zero. After step 220, or if step 204 determines that thehalogen monitoring apparatus 10 is operative in its TEST mode, theprogram goes to step 222, which sets the tap of the analog multiplexer72 to its minimum gain setting 7, before step 224 sets the tap settingto 7. Next, step 226 resets the leak wait mode flag indicating that thehalogen monitoring apparatus 10 has not detected a halogen leak and isprocessing the three wait periods. Next, step 228 sets a leak detectflag indicating that a leak has been detected and has been validated asdecided in step 208 and further activates the FET Q12 by placing a logicone on P23 pin 24 of the microcontroller 62 to enable an external alarmas indicative of a valid leak. The leak control subroutine 200 nowenters a loop through the steps 230 to 236. Step 230 energizes the lightindicator 88 to flash to provide a visual indication that a validatedhalogen leak has been determined, before the serial I/O subroutine 120is called to permit communication between the remote halogen monitoringapparatus 10 and the centrally disposed main controller. The watchdogsubroutine 104 is called to periodically strobe the watchdog circuit 34thereby preventing the resetting of the microcontroller 62. Next, step236 determines whether the leak detect flag has been set or reset. Ifset, the program will continue to loop through steps 230 to 236, untilthe halogen leak within the enclosure has been monitored and cleaned up,and the main controller has transmitted a command to this apparatus 10resetting its leak detect flag. After being reset, step 236 returns theprogram to step 102.

Referring now to FIG. 3C, the details of the serial I/O subroutine 120will be explained. The microcontroller 62 executes the serial I/Osubroutine 120 to operate its transceiver 60 in either its transmit orreceive modes to respectively transmit messages via its serialcommunication port 86 to the centrally disposed main controller or toreceive messages therefrom. Referring to FIG. 2D, the microcontroller 62actuates its enable line pin 32 to a logic one to transmit a message viaits transmitter pin 31 and, conversely, enables its enable line pin 33to a logic zero to receive messages from the transceiver 60 via itsreceiver line pin 1. In this fashion, each of the plurality, e.g., 32,of halogen monitoring apparatus 10 is capable of communicating with itscentrally disposed main controller over a common transmission line in apolling scheme, which requires that each of the apparatus 10 has its ownunique address as set by switches 1 to 5 of its dipswitch 64. Thus, ifthe main controller wants to receive or transmit a message to aparticular apparatus 10, the main controller must utilize apredetermined protocol, e.g., BISYNC®, and include in the message theaddress of the particular apparatus 10 it wishes to poll.

Referring to FIG. 3C, when the serial I/O subroutine 120 is called, step302 disables the transmitter of the transceiver 60 by setting pin 32 ofthe microcontroller 62 to a logic low, and enables the receiver of thetransceiver 60 by setting its pin 33 also to a logic low. Next, step 304tests pin 1 of the microcontroller 62 for any change applied theretofrom the main controller through the serial communication port 86 andthe transceiver 60 within a 100 msec. period, and if no activity ispresent on this receiver line, the serial I/O subroutine 120 is exited,after step 322 tests to determine if the main controller had previouslysent t this halogen monitoring apparatus 10 a disable command, i.e., thedisable flag has been set. Such disable commands permit the maincontroller to selectively disable selected of the apparatus 10. If thisapparatus 10 is disabled, the serial I/O subroutine 120 returns to step302 and will continue in this loop until the main controller transmits amessage to this apparatus 10 to RESET its disable flag.

On the other hand, if a signal has been applied to the serial input pin1 of the microcontroller 62 as determined by step 304, the subroutine120 moves to step 306 which synchronizes the microcontroller 62 with the1200 baud data message being transmitted by the main controller. Next,step 308 inputs the transmitted message to the microcontroller 62 fromthe main controller; the transmitted message comprises an OP-ADDR byte,which includes a read or write command plus the address of the polledapparatus 10, and a status byte which may command the addressed halogenmonitoring apparatus 10 to reset or disable itself. In step 309, theACK/NAK flag is tested, which can only be set below in step 318 afterthe apparatus 10 has finished transmitting to the main controller. Ifthe ACK/NAK flag is set, then the flag is reset at step 311, thesubroutine is exited at step 313, and the program resumes to the nextinstruction after the call to Serial I/O subroutine 120. If the ACK/NAKflag is not set, Step 310 determines whether the address sent by themain controller matches that of this apparatus 10 as set by itsdipswitch 64. If the transmitted and retained addresses are different orif there are errors in the message received from the main controller,the subroutine 120 returns to step 322. If the addresses match, i.e.,the main control is transmitting its message to this apparatus 10, thenstep 310 disables the receiver of the transceiver 60 by applying a logicone output to the REpin 2 of the transceiver 60 and enabling thetransmitter of the transceiver 60 by applying a logic one output to theDE pin 32 of the transceiver 60. Next, step 314 reads the status byte aspresently transmitted from the main controller. If the main controllerhas commanded this apparatus 10 to operate into its READ state, itsstatus registers as formed in the RAM of the microcontroller 62 areaccessed and a message is transmitted in step 316 via its pin 31 to themain controller in the correct BISYNC® format. The message includes thefollowing data: (1) the positions of the switches 6 to 8 of thedipswitch 64 as would be indicative of the desired sensitivity andwhether this regulating circuit 10 is in its RUN or TEST mode; (2) thestatus flags-leak wait mode, leak detect mode, disable mode; (3) the"original" and "current" values of the tap positions of the analogmultiplexer 72; (4) the "current" value of the output signal of thehalogen sensor 12; (5) the "original" value of the output of the halogensensor 12; (6) the value of the 180 V; (7) the value of the 5 V; (8) thevalue of the +12/-15 V; and (9) the value of the heater current.

An important note to realize here is that the current values of tapposition and sensor magnitude are transmitted frequently to the maincontroller. When the predetermined level of halogen gas has beenexceeded, the quantitative value can be computed and displayed by themain controller, whereby the urgency of the leak detect flag signal canbe evaluated by the service operator.

Next, step 318 sets the host ACK/NAK flag to tell the halogen monitoringapparatus 10 that the next incoming message from the main controller isan acknowledged signal indicating that the main controller received themessage transmitted from the apparatus 10 in step 316 or a negativeacknowledge signal indicating that it did not. Step 320 then disablesthe transmitter of the transceiver 60 and the receiver thereof isenabled, before the subroutine 120 returns to step 308 to wait for theACK/NAK message from the main controller.

If step 314 has examined the status byte from the main controller anddetermines that it directs the apparatus 10 to operate in its WRITEstate, the subroutine 120 moves to step 322, which causes an acknowledgemessage to be transmitted back to the main controller with the sameOP/ADDR field that the main controller had sent to this apparatus 10.After such a transmission, step 324 then disables the transmitter andenables the receiver of the transceiver 60 to receive the nexttransmission of the main controller. Next, step 326 reads the statusbyte to determine if the main controller has sent a reset command to setthe reset mode flag; if the reset mode flag has been set, step 338resets the leak wait mode and the leak detect flags before exiting thissubroutine 120 and returning to the calling step. On the other hand, ifthere is no reset command as determined by step 326, step 328 determineswhether a disable command has been sent from the main controller and, iftrue, step 330 sets the disable flag. Thereafter, step 336 effects areturn to the calling step. If the disable flag is not set, then step334 resets the disable flag and the subroutine 120 is exited in step336.

Referring now to FIG. 3D, the detailed steps of the zeroing circuitsubroutine 198 are shown. As described above with regard to the maincontrol program 100, the zeroing circuit subroutine 198 is called ifsteps 186 and 188 determine that the operator has just changed therun/test switch 6 of the dip switch 64 from the TEST mode to the RUNmode. In that case, the zeroing circuit subroutine 198 is called tocancel out the steady state background level signal outputted by thehalogen sensor 12, and to remember (store) that signal level permanentlyuntil it is reprogrammed when this halogen monitoring apparatus 10 wouldbe reinstalled in a new enclosure, the halogen sensor 12 is replaced orthe apparatus 10 is otherwise recalibrated. Initially in step 400, thedelta test flag is reset, so that the zeroing circuit subroutine 198 iscalled just once between recalibrations of the halogen sensor 12. Next,step 402 sets a counter of the EEPOT 80 to a predetermined count, e.g.99, to keep track of the 99 positions of the output wiper arm on the VWpin 5 of the EEPOT 80. Next, step 404 tests whether this wiper arm isnot at the maximum voltage position VH and, if not, step 406 actuatesthe indicated inputs of the EEPOT 80, before step 408 commands and step412 moves the wiper arm up one position to raise the output voltage by0.05 V at the inverting input of the operational amplifier 82, whichmultiplies that increase by minus 2 to place an additional -0.1 V at theinverting terminal of the operational amplifier 76a. The output of thehalogen sensor 12 is converted in subroutine 116 to a digital signal,which is also applied to the input of the operational amplifier 76a.Next, step 424 examines pin 10 of the A/D converter 54 to determinewhether the output of the halogen sensor 12 is still greater than orequal to 1/2 of its full scale value. If so control of the zerosubroutine 198 returns to step 404 and the zeroing circuit subroutine198 will stay in the loop of steps 404 to 424 until the output of theA/D converter 54 falls below 1/2 full scale.

When less than 1/2 full scale, the subroutine 198 moves to step 426 totest the gain tap of the analog multiplier 72 and, if not set to itsmaximum gain tap, i.e. its zero tap, then step 428 decreases the tapgain and step 430 physically changes the tap to the next lower settingto increase the gain of the operational amplifier 76a. The subroutine198 will loop through steps 426 to 438, until the A/D converter 54overflows in response to the output of the halogen sensor 12. Whenoverflow does occur as sensed by step 438, control of the subroutine 198returns to step 404 and the position of the wiper arm of the EEPOT 80 isonce again incremented as in step 408 until the output from the A/Dconverter 54 of the halogen sensor 12 falls below 1/2 full scale.

When either the wiper arm of the EEPOT 80 reaches its maximum setting VHas determined by step 404 or the gain tap of the analog multiplexer 72reaches its maximum gain setting of zero as determined by step 426, thezeroing circuit subroutine 198 moves to step 440. Step 440 tests theinput pin 10 of the A/D converter 54 for an input of the halogen sensor12 for overflow. If there is an overflow, step 442 increments the tap ofthe analog multiplexer 72 to thereby decrease the gain of the sensoramplifier 74. Next step 444 tests whether the gain tap of the analogmultiplexer 72 is at its minimum gain position 7. If at its minimum gainposition and, as tested in step 440, the A/D converter output overflows,there is an indication of a leak detection and the program control jumpsto step 200 to process a leak being detected. If the gain tap of theanalog multiplexer 72 is not at its minimum position 7, step 446 furtherincrements the tap position of the analog multiplexer 72 to decrease thegain of the sensor amplifier 74 and the subroutine 198 continues to loopthrough step 440, until the A/D converter output does not overflow asdetermined by step 440. In particular, step 446 effects a change of thetap to the next highest setting to thereby decrease the gain of thesensor amplifier 74. Thus, the zeroing circuit subroutine 198 adjuststhe position of the output of the EEPOT 80 from its minimum value VL tothat value at which a compensating voltage as output by the operationalamplifier 82 will cancel or substantially cancel the background signalas derived from the halogen sensor 12. The compensating output of theoperational amplifier 82 is applied to the inverting input of theoperational amplifier 76a, whereby its output is substantially zero. Atthat point, the position of the wiper arm of the EEPOT 80 is set in amechanical sense and a signal indicative of its position stored in itsnon-volatile memory in the form of the counter. Thus, until the halogenmonitoring apparatus 10 is recalibrated, the EEPOT 80 will output asignal corresponding to the background level of halogen as provided bythe halogen sensor 12 when the zeroing circuit subroutine 198 wasexecuted initially in response to the run/test switch 6 being disposedfrom its test to run positions. The setting of the wiper arm of theEEPOT 80 will not be changed until the halogen sensor 12 is recalibratedand the run/test switch 6 is again reset from its test to run positions.

When overflow does not occur as tested in step 440 the subroutine 198moves to step 454, wherein the tap setting of the analog multiplexer 72is set to the "original" value thereof as stored in themicrocontroller's RAM and step 456 saves the output of the sensoramplifier 74 as derived from the halogen sensor 12 into the "original"value location of the microcontroller's RAM. Thereafter, the subroutine198 exits and returns to step 110 of the main control program 100.

Referring now to FIG. 3E, the detailed steps of the analog to digital(A/D) subroutine 116 will now be explained. The A/D subroutine 116converts any of the analog signals as applied to the A/D converter 54including the amplified sensor signal from the halogen sensor 12, ascaled down 180 volt power supply signal, a scaled down 5 V power supplysignal, and either of the rectified +12 or -15 power supply voltages, asrespectively applied to the pins 10 to 13 of the A/D converter 54. Whenthe A/D subroutine 116 is called from any of a number of points in theprogram, control jumps to step 500, which causes a message indicative ofthe selected channel(s) to be sent serially from pin 37 of themicrocontroller 62 to pin 3 of the A/D converter 54, where it is storedin a pair of registers DO and D1. If the selected input signal to beconverted is from the halogen sensor 12, then step 506 actuates thesample and hold circuit 56 wherein the sensor output is stored oncapacitor C27 and, further, the sample and hold circuit 56 isdisconnected from the operational amplifier 76b so that no change willtake place while the A/D converter 54 is effecting the A/D conversion instep 510. In steps 514 and 516, the digital value is serially sent topin 39 of the microcontroller 62. Thereafter, step 520 tests the DO andD1 register pair to see if there are any more analog signals to beconverted. If there are further signals to be converted, the subroutine116 again will loop through steps 502 to 524. If not, the subroutine 116exits to step 522 to return to that point in the program from which theA/D subroutine 116 was called.

Referring now to FIG. 3F, the steps of the watchdog subroutine 104 arefurther described. When called, the watchdog subroutine 104 enters step340, which outputs a logic low upon the RD pin 8 of the microcontroller62 to the operational amplifier 28c of the watchdog circuit 34, wherebya ground circuit is formed for the capacitor C14 of the timing circuit36; as a result, the capacitor C14 is discharged at least every 32 msec.to prevent the reset circuit 32 from otherwise pulsing the RESET pin 4of the microcontroller 62 and thus resetting same. Thereafter, the step342 exits this subroutine 104 to return to that point in the program 100from which the watchdog subroutine 104 was called.

Referring now to FIGS. 4A and 4B, there is shown a further, preferredembodiment of the halogen monitoring apparatus of this invention,wherein like elements are assigned corresponding numbers, but in the 600series. The sensor 614, as shown particularly in FIG. 4A, is adapted tobe incorporated into the halogen monitoring circuit as more fully shownin FIG. 4B. The current flowing through the collector/cathode element614 is directly proportional to the amount of the halogens in the airsample flowing through the sensor 612 and provides an output signalproportional to that halogen concentration. The power supply 620provides a regulated 180 volts between the collector/cathode element 614and the heater/anode element 613. The power control switch 624 isactuated by a signal developed by the microcontroller 662 and appliedvia the control line 625 to the power control switch 624 to remove the180 volts across the elements 613 and 614. The switch 624 may take theform either of a series or shunt circuit. The ionization voltage asapplied via the switch 624 flows through the heater/anode element 613 tothe collector/cathode element 614 and through a series connectedresistor 631 and potentiometer 633, as shown in FIG. 4B, to the groundreturn of the power supply 620.

As shown in FIG. 4A, the voltage applied across the heater/anode element613 is provided by the heater regulation circuit 640 as comprises avoltage regulator circuit 629, which outputs a substantially fixedvoltage which will be regulated in accordance with the temperaturechanges of the heater/anode element 613 to thereby control the voltageand the current as applied to the element 613 such that a substantiallyconstant temperature of 900° C. is maintained at the heater/anodeelement 613 of the sensor 612. The heater/anode element 613 isincorporated as a leg of a resistance bridge, which comprises a diode603, resistors 604 and 606, and a potentiometer 607. If the temperatureof the heater/anode element 613 varies, an error current is produced andapplied to the base of a transistor 608. The error current is amplifiedby the transistor 608, which outputs and applies the amplified errorcurrent to a feedback input of the voltage regulator circuit 629. Thevoltage regulator circuit 629 outputs at its + and - terminals theregulated voltage across a pair of resistors 609 and 610, which serve tolimit the initial startup voltage. A capacitor 605 is connected inparallel across the resistor 610 and reduces any tendency of thiscircuit to high frequency oscillation. Typically, the heater/anodeelement 613 is comprised of a platinum wire. Since the temperature vs.resistance relationship of platinum is consistently linear, theresultant temperature control is carried out without switching effectsor variations which would affect the low level ionization currentsflowing between the heater/anode element 613 and the collector/cathodeelement 613. In addition, the temperature regulation circuit 640 doesnot waste energy in the form of heat, thus significantly extending thereliability and useful life of the components in the circuit 640.

Referring now to FIG. 4B, the output of the sensor 612 is developed bythe current as flows through the collector/cathode element 614 and theseries connected resistor 631 and potentiometer 633. A voltageproportional to this current is developed at the tap of thepotentiometer 633 and is applied to a buffer amplifier 635, which isconnected as a voltage follower to the VIN(+) input of ananalog-to-digital (A/D) converter 637. The A/D converter 637 provides adigital output via a data bus 647 to an input/output port of themicrocontroller 662.

The microcontroller 662 applies a digital output via its input/outputport and a data bus 649 to a multichannel digital-to-analog (D/A)converter 639. The microcontroller 662 applies a strobe pulse via astrobe line 653 to the D/A converter 639, which applies via its first orchannel A output a reference voltage. After buffering by a voltagefollower 641, this reference voltage is applied to the A/D converter 637at its VREF input. The microcontroller 662 applies a strobe signal via astrobe line 655 to the A/D converter 637, which in response applies viathe data bus 647 to the input/output port of the microcontroller 662, adigital signal corresponding to the ratio of the signal applied to theVREF input and the output of the sensor 612 as applied to the VIN(+)input. As will be explained, the microcontroller 662 is programmed foradjusting the level of the VREF input, whereby the gain afforded theoutput of the sensor 612 is automatically adjusted to be in rangewithout potential stability problems.

As further shown in FIG. 4B, a dipswitch 657 is connected to themicrocontroller 662, whereby an operator may throw the dipswitch 657 tocause an offset voltage as developed at a second or channel B output ofthe D/A converter 639 to be applied to the differential input VIN(-)input of the A/D converter 637, whereby a zero output is applied to thedata bus 647. As will explained later, the microcontroller 662 appliesvia the data bus 649 a digital value to the D/A converter 639 to providethe desired offset after being buffered by a voltage follower 643. As aresult, the residual output from the sensor 612 as occurs in the absenceof halogens or in the presence of a residual level thereof, is offset toprovide a zero input to the input/output port of the microcontroller662.

Various parameters of the halogen monitoring apparatus as shown in FIG.4B are stored in a non-volatile memory or RAM 651. Further, the halogenmonitoring system and, in particular, its microcontroller 662 is incommunication with a master computer, whereby the concentrations ofhalogen being monitored at the remotely disposed monitoring system maybe communicated to the centrally disposed master computer. Further, themaster computer can send messages to control and/or reset the operatingparameters of the remote halogen monitoring apparatus. In anillustrative embodiment of this invention, a transceiver 660 functionsas a two wire serial interface with the master computer usingillustratively the Electronic Industries Association Revised Standard485. In an illustrative embodiment of this invention, themicrocontroller 662 may be implemented by that controller asmanufactured by the Electronic Monitoring and Controls Corp. under theirdesignation NC-10. The switching voltage regulator 11 may illustrativelytake the form of that regulator manufactured by Maxim Corp. under theirdesignation MAX638. Illustratively, the A/D converter 637 may take theform of that converter as manufactured under the generic designation ADC801, the D/A converter 639 may take the form of that converter asmanufactured under the generic designation AU 1741 and the transceiver660 may take the form of that receiver manufactured under the genericdesignation 75176.

Referring now to FIG. 5A, there is shown the main loop of the program700 as executed by the microcontroller 662. Initially in step 702, the110 volts AC is applied to the halogen monitoring system of FIGS. 4A andB. Next in step 704, at least three timing parameters and two voltagethreshold levels are read out from the non-volatile RAM 651 for lateruse in the program 700. Illustratively, the three timing parametersinclude reprogrammable counts indicative of an initial warmup period, await period before the cathode/anode voltage is reapplied to the sensor612 after it has been turned off and an alarm period initiated uponsensing a level of halogen concentration above a first or alarm levelthereof. The voltage threshold levels include the alarm level, which ifexceeded by the halogen concentration level measured by the sensor 612,will cause an alarm condition, and a shutdown level corresponding tothat level, which if exceeded, will cause the sensor 612 to be turnedoff. These five parameters are reprogrammable and messages may be sentfrom the master computer to selectively reset any or all of theseparameters dependent upon the observed levels of halogen and theparticular application of this halogen monitoring apparatus.

Next step 706 times out the initial sensor warmup period to permit thesensor 612 to stabilize. During the warm-up period, the heater/anodeelement 613 is heated to its operating temperature in the order of 900°C., and the sensor 612 is stabilized before commencing operation of thesystem and, in particular, the resetting of the microcontroller 662.Then step 708 tests the dipswitch 657 to determine whether or not it hasbeen thrown by the resident operator to adjust the offset voltage,whereby the background level of the output of sensor 612 is determinedand is used as an offset such that the output of the A/D converter 637will provide thereafter a zero output to the microcontroller 662. Ifyes, the program moves to a subroutine 722 as will be described withrespect to FIG. 5C. If not, the main loop moves to step 710, whichmeasures and tests the halogen level as provided by the output signal ofthe sensor 612, as will explained in more detail with respect to FIG.5B. Generally, the subroutine 710 adjusts the gain imparted by the A/Dconverter 637 to the output signal of the sensor 612 so that it iswithin the range of the A/D converter 637. Next, step 712 determineswhether the halogen level as sensed by the sensor 612 is greater thanthe alarm level. In this regard, the alarm level may be set equal to orless than the shutdown level. As will become apparent, if the measuredhalogen level exceeds the shutdown level, the anode/cathode voltage willbe removed to thereby turn off the sensor 612. On the other hand, if thehalogen level exceeds the alarm level, but not the shutdown level, thesensor 612 will be permitted to continue to sense the halogen level atleast until the alarm period times out and the sensor 612 is turned off.If the halogen level exceeds the alarm level as determined in step 712,the timing of the preset alarm period will begin and, if exceeded, asdetermined in step 714, the main loop will move to step 726 to transmita message via the transceiver 660 to the master computer. Thereafter,step 728 will turn off the sensor 612 until a command "start again" isreceived from the master computer, at which time the program will returnto step 706.

If the alarm period has not timed out as determined in step 714, step715 determines whether the shutdown level has been exceeded. If not, themain loop continues to monitor the halogen level and returns to step710. If the shutdown level has been exceeded, the cathode/anode voltageis removed in step 715 from the sensor 612. Next in step 716, the waitperiod is timed out while the sensor 612 is turned off. Thereafter, step720 times a second warmup period to permit the sensor 612 torestabilize, before the main loop returns to step 710 to again test thehalogen level. Thus, it is seen that if the halogen level exceeds theshutdown level, the sensor 612 will be turned off for the wait period topermit the sensor to recheck the halogen level before sending acommunication to the master computer indicative that the shutdown levelhas been exceeded.

Referring now to FIG. 5B, the halogen level testing subroutine 710 willbe more fully explained. The anode/cathode voltage is initially appliedto the sensor 712 in step 740, before step 742 causes themicrocontroller 662 to apply an 8 bit digital value indicative of theVREF via the data bus 649 to the D/A converter 639, before themicrocontroller 662 applies a strobe via the strobe line 653 to causethe corresponding analog value of the VREF to be read out upon itschannel A output. The value of the initial digital input is 01 HEX. Thedigital input to the D/A converter 639 determines that factor by whichthe voltage output by the voltage reference 645 will be divided toprovide an analog signal on the channel A output. In the illustrativeexample where the reference output is 2.5 V, the initially set voltageon the channel A output equals 2.5/255 V for the digital input of 01HEX. Next, step 744 causes the microcontroller 662 to apply a strobe viaits strobe line 655 to the A/D converter 637 to take a reading of theA/D converter 637. It is understood that this digital reading equalsVIN/VREF times 255; thus, if the analog output of the sensor 612 asapplied to the VIN(+) input is less than the VREF, the output of the A/Dconverter 637 will be in range, i.e., less than 255 as determined instep 746.

In particular, step 746 determines whether the digital output of the A/Dconverter 637 is over full scale, i.e., is equal to 255 or greater. Ifout of range or over full scale, step 748 determines whether the numberof times that the subroutine 710 has incremented a pass counter, i.e.,has looped through the steps 744 to 752, exceeds 6. If the number ofpasses is less than 6, step 750 increments the pass counter, before step752 multiplies the value of VREF by 2, i.e., the digital output of themicrocontroller 662 is increased to 02 HEX and the analog value of VREFappearing upon the channel A output of the D/A converter 639 is doubled.As a result, the effective digital gain imparted by the A/D converter637 to the sensor signal is doubled. It is seen that the subroutine 710will loop through the steps 744 to step 752 until the pass counterexceeds 6 or the digital output reading obtained from the A/D converter637 is in range. If in range, step 754 determines the halogen level asan exponential value, whose mantissa is the output value of the A/Dconverter 637 and whose exponent is the count accumulated the passcounter. Also, the incremented count of the pass counter corresponds tothe gain imparted by the A/D converter 637. After step 754, the programreturns to step 712 of the main loop as shown in FIG. 5A. If the passcount exceeds 6 as determined in step 748, the subroutine 710 moves tostep 754 to provide an indication that a large halogen reading has beentaken.

Referring now to FIG. 5C, there is shown the subroutine 722 that iscalled to zero out the background level of the sensor output as wouldrepresent that residual sensor signal in the absence of or with abackground level of the halogens in the enclosure being monitored. Thesubroutine 722 is entered from step 708 to an initial step 760 as wouldindicate that the dipswitch 657, as shown in FIG. 4B, has been thrown tothe corresponding position. In step 762, the microcontroller 662 outputsupon its data bus 649 a digital value corresponding to a 00 HEX andapplies a strobe via the strobe line 653 to output from the D/Aconverter 639 a zero reference signal, which after it is buffered by thevoltage follower 643, serves as the offset for the A/D converter 637 atits VIN(-) terminal. Next, step 764 sets the A/D converter 637 to itsunity or maximum gain as is designed to provide a max signal, i.e., adigital output indicative of 255. The microcontroller 662 applies adigital value via the data bus 649 to the D/A converter 639 and strobesit via the line 653, whereby an output is provided at channel A. Afterbeing buffered by the voltage follower 641, this output serves as theVREF input to achieve unity gain of the A/D converter 637. Next, step766 examines the output of the A/D converter 637 and, if equal to zero,step 722 stores that value as applied to the VIN(-) input, whichprovides the desired offset for the background level of halogens sensedby the sensor 612. That offset value is stored in step 774 in thenon-volatile RAM 651, before step 776 returns to step 724 of the mainloop, as shown in FIG. 5A. Step 724 again tests the dipswitch 657 todetermine whether it has been released. If not, the program continues toloop through step 724 until the dipswitch 657 is released, at which timethe program returns to step 710.

If the output of the A/D converter 637 is not zero as determined by step766, step 768 increments by 1 the digital value applied to the D/Aconverter 639. Thereafter, step 770 determines whether the presentlyincremented value of VIN(-) equals to 255. Should the VIN(-) value reach255 without a zero reading, the microcontroller 662 actuates itstransceiver 660 to transmit an emergency message to the master computerindicative of detection of an extremely high background level ofhalogens, before turning off the sensor 612 and waiting in step 780 forservice. The subroutine 722 will loop through steps 764 to 770incrementing the digital value provided by the microcontroller 662 tothe D/A converter 639 until a zero reading is obtained in step 766 asindicates that the differential input level as applied to the VIN(-)input would provide a zero reading from the A/D converter 637, wherebythe constant background level provided by the sensor 612 is offset oreliminated.

Thus, there has been shown apparatus or a circuit including a sensor fordetecting halogen leaks, which is capable of use over an extended periodof time in the order of months and even years for monitoring halogenleaks in an enclosure. The apparatus and process of this invention iscapable of extending the life of the halogen sensor for extended periodsof time by deenergizing this sensor upon the detection of a leak,whereby the continued drawing of the ionization current through thecollector/cathode of the sensor is stopped and the life of the sensorextended. Further, the apparatus and process of this invention iscapable of initially taking a measurement of the background level of anyhalogen that may be present in an enclosure, storing that backgroundlevel over an extended period of time, and subtracting it from thecurrent outputs of the halogen sensor to determine an increase in thelevels of concentration of halogen compounds in the enclosure and thus aleak. Further, this invention is capable of operating to sense a widerange of levels of concentration of halogen compounds as may be presentin the enclosure, by automatically adjusting the gain of the sensoroutput amplifier and of and remembering the adjusted gain level and theselected one of a plurality of degrees of sensitivity for this apparatusto determine a valid leak, as opposed to a spurious reading. Because themain controller communicates with this apparatus, the size of the leak,its location, its date and time can be stored onto the memory medium ofthe main controller for future analysis.

In considering this invention, it should be remembered that the presentdisclosure is illustrative only and the scope of the invention should bedetermined by the appended claims.

I claim:
 1. Apparatus for detecting an increase of a selected differencein the concentration of halogen gas in a gaseous atmosphere from a firstlevel to a second level thereof, said detecting apparatus comprising:(a)a sensor including a heater/anode element and a collector/cathodeelement disposed to define a space therebetween through which saidgaseous atmosphere flows; (b) means coupled to said heater/anode elementand said collector/cathode element for applying a voltage therebetween,whereby ionization of said halogen gas causes a current flow betweensaid heater/anode element and said collector/cathode element of amagnitude proportional to the concentration level of said halogen gas insaid gaseous atmosphere; (c) first control means coupled to one of saidelements for detecting an increase in said ionization current flow by acorresponding amount as would indicate that the concentration level ofhalogen gas has increased by said selected difference to provide amanifestation indicative thereof; and (d) second control meansresponsive to said increased current manifestation for controlling saidvoltage supplying means, whereby its voltage as applied between saidheater/anode element and said collector/cathode element is substantiallyreduced to a magnitude such that said ionization of said halogen gas andthus said current flow between said collector/cathode element and saidheater/anode element are extinguished so that the life of said sensor isextended.
 2. The detecting apparatus as claimed in claim 1, whereinthere is further included means coupled across said heater/anode elementfor applying a voltage thereacross to produce a current sufficient toheat said sensor to its operating temperature.
 3. The detectingapparatus as claimed in claim 1, wherein there is further included alarmmeans for providing a manifestation indicative of a valid halogen leak,and actuating means responsive to said voltage reduction by said secondcontrol means for actuating after a predetermined period of time saidvoltage applying means to increase said voltage between saidheater/anode and collector/cathode elements, whereby said first controlmeans may detect a repeated increase in said ionization current flow inexcess of said given difference, said alarm means being responsive to aplurality of said increased current manifestations for providing saidvalid halogen leak manifestation.
 4. The detecting apparatus as claimedin claim 3, wherein said actuating means is also responsive to saidincreased current manifestation for disabling said first control means.5. The detecting apparatus as claimed in claim 4, wherein said actuatingmeans causes said voltage applying means to increase said voltagebetween said heater/anode and collector/cathode elements for a warm-upperiod, before re-enabling said first control means to detect saidionization current flow, wherein said sensor is permitted to stabilizebefore said first control means is reenabled to detect a repeatedincrease in said ionization current flow.
 6. The halogen detectingapparatus as claimed in claim 1 as adapted for detecting a leak of saidhalogen gas within said gaseous atmosphere as confined in an enclosure,said halogen leak detecting apparatus further comprising memory means,and means for taking a first reading of said ionization current flow asindicative of a background level of said halogen gas within saidenclosure and for storing said first reading in said memory and fortaking second readings of said ionization current flows and fornon-destructively accessing said memory and subtracting said firstreading from each of said second readings to provide a compensatedoutput indicative of any increase of said level of halogen gas abovefrom said background level.
 7. Apparatus for monitoring a gaseousatmosphere within an enclosure over an extended period of time for anincrease in the level of concentration of a halogen gas within saidenclosure, said gas monitoring apparatus comprising:(a) a sensor exposedto said gaseous atmosphere for providing a signal indicative of thelevel of concentration of said halogen gas within said enclosure; (b)memory means; (c) first control means for taking an initial reading ofsaid sensor signal as indicative of a background level of theconcentration of said halogen gas within said enclosure and for storingsaid background level in said memory; and (d) second control means forthereafter periodically taking current readings of said sensor signalover said extended period of time and for nondestructively accessingsaid memory means and subtracting said background level from each ofsaid current readings to provide a compensated sensor signal indicativeof the current level of halogen concentration less said background levelthereof.
 8. The monitoring apparatus as claimed in claim 7, wherein saidmemory means comprises a non-volatile memory.
 9. The monitoringapparatus as claimed in claim 8, wherein said non-volatile memorycomprises an electrically erasable potentiometer.
 10. The halogenmonitoring apparatus as claimed in claim 7 as adapted for monitoringsaid gaseous atmosphere for a given increase in the level of saidhalogen concentration as would indicate a valid leak of said halogen gaswithin said enclosure in contrast to a spurious indication thereof,wherein there is further included third control means for initiallytaking a first reading of said compensated sensor signal and thereaftera second reading of said compensated sensor signal and for storing saidfirst and second readings in a second memory means, fourth control meansfor accessing said second memory means for determining a differencebetween said stored first and second readings to provide an indicationof said measured increase of the concentration level of said halogengas, and fifth control means for comparing said measured increaseindication with said given increase and, if greater, for providing awarning manifestation indicative of said valid leak of said halogen gas.11. Apparatus for monitoring a gaseous atmosphere to detect a wide rangeof the levels of concentration of a halogen gas within said gaseousatmosphere as confined in an enclosure, said monitoring apparatuscomprising:(a) a sensor exposed to said gaseous atmosphere for providinga signal indicative of the concentration level of said halogen gaswithin said gaseous atmosphere; (b) means coupled to said sensor foramplifying said sensor signal to output an amplified signal indicativeof the halogen gas concentration level, said amplifying means having avariable gain; (c) means for setting said gain of said amplifying means;and (d) means coupled to said variable gain amplifying means fordetermining whether said amplified output signal is greater than apredetermined level and, if so, for causing said gain setting means todecrease said gain of said amplifying means.
 12. The halogen gasmonitoring apparatus as claimed in claim 11, wherein there is furtherincluded means for causing said gain setting means to increase said gainof said amplifying means until said determining means determines thatsaid sensor signal is greater than said predetermined level.
 13. Thehalogen gas monitoring apparatus as claimed in claim 11, wherein saidsetting means variably sets said gain of said amplifying means at aselected one of a plurality of discrete gains.
 14. The halogen gasmonitoring apparatus as claimed in claim 13, wherein there is furtherincluded means for causing said setting means to increase said gain tothe next greater discrete gain of said plurality until said determiningmeans determines that said sensor signal is greater than saidpredetermined level and, thereafter, for causing said gain setting meansto set said gain at the next lower discrete gain of said plurality. 15.The halogen gas monitoring apparatus as claimed in claim 11, whereinsaid sensor provides its signal in analog form, and there is furtherincluded an analog to digital converter coupled to receive said analogsensor signal for converting same into a corresponding digital signal,said determining means responsive to said digital signal for determiningwhether said analog to digital converter has overflowed and, if so, forcausing said setting means to decrease said gain of said amplifyingmeans.
 16. The halogen gas monitoring apparatus as claimed in claim 11,as adapted to detect an increase in the level of the concentration ofsaid halogen gas as would indicate a valid leak of said halogen gas asopposed to a spurious indication thereof, wherein said gain settingmeans increases incrementally said gain until said determining meansdetermines that said sensor signal is greater than said predeterminedlevel and for causing said gain setting means to decrease said gain to adetermined lower gain, memory means, means for first taking an originalvalue of said determined gain and thereafter current values of saiddetermined gains and for storing said original value of said determinedgain in said memory means, means for accessing said memory means fordetermining a difference between said original value and each of saidcurrent values of said determined gains to provide an indication of themeasured increase of the concentration level of said halogen gas, andmeans for comparing said determined gain difference with a predeterminedgain difference and, if greater, for providing a warning indicationindicative of said valid leak of said halogen gas.
 17. The halogen gasleak monitoring apparatus as claimed in claim 16 wherein said takingmeans first takes an original value of said sensor signal and thereaftercurrent values of said sensor signal and for storing said original valueof said sensor signal in said memory means, and comparing means forcomparing said determined gain difference with said predetermined gainincrease and if equal and said current value of said sensor signal isgreater than said original value of said sensor signal, for providingsaid warning indication of said valid leak of said halogen gas.
 18. Thehalogen gas monitoring apparatus as claimed in claim 11, wherein thereis further included comparison means coupled to said variable gainamplifying means for comparing said amplified output signal with a setreference concentration level and, if said amplified output signal isgreater, for providing an indication of a halogen gas leak into saidgaseous atmosphere.
 19. Apparatus for monitoring a gaseous atmospherefor a selected increase in the level of the concentration of a halogengas within a given enclosure as would indicate a valid leak of saidhalogen gas in contrast to a spurious indication, said leak monitoringapparatus comprising:(a) a sensor exposed to said gaseous atmosphere forproviding an output signal indicative of the concentration level of saidhalogen gas within said enclosure; (b) means for calibrating said sensoroutput signal with respect to a background level of the concentration ofthe halogen gas in said enclosure, to provide a calibrated outputsignal; (c) means for periodically taking a reading of said calibratedoutput signal to provide a series thereof over an extended monitoringperiod; (d) means for measuring the difference between successivereadings of said calibrated output signal; (e) means for variablyselecting the magnitude of said selected increase and (f) means forcomparing said measured difference with said selected increase and, ifgreater, for providing an indication of said valid leak of said halogengas into said enclosure.
 20. The monitoring apparatus as claimed inclaim 19, wherein said calibrating means comprises a non-volatile memorymeans means actuated at the beginning of said monitoring period fortaking an initial reading of said sensor output signal to provide anindication of said background level of the concentration of said halogengas within said enclosure and storing same in said non-volatile memorymeans, and means for non-destructively accessing said non-volatilememory means and subtracting said background level from the currentlevel of said sensor output signal to provide said calibrated outputsignal.
 21. The monitoring apparatus aS claimed in claim 19, adapted fortransmitting a message indicative of said valid leak indication to acontroller disposed remotely of said monitoring apparatus, wherein thereis further included means responsive to said indication to be enabledfor transmitting said message to the controller.
 22. The monitoringapparatus as claimed in claim 21, wherein said transmitting means isresponsive to said valid leak indication for transmitting saidcorresponding measured difference with said message to the controller.23. The monitoring apparatus as claimed in claim 21, wherein there isincluded means coupled to said sensor for amplifying said sensor outputsignal, said amplifying means having a variable gain, means for settingsaid gain of said amplifying means, means for first taking a first valueof said set gain corresponding to said background level of said sensoroutput signal and thereafter second values of said set gaincorresponding to each of said current levels of said sensor outputsignal and for storing said first and second gain values in said memorymeans, means for accessing said memory means and for determining a gaindifference between said first value and each of said second values ofsaid set gain to provide an indication of said halogen gas, saidcomparing means comparing said determined gain difference with apredetermined gain difference and, if greater, for providing said leakindication, said transmitting means responsive to said leak indicationto be enabled for transmitting said determined gain difference with saidmessage to the controller.
 24. Apparatus for detecting and measuringconcentration levels of a halogen gas within a gaseous atmosphere overan extended continuum, said continuum comprising a plurality ofnonoverlapping ranges, said apparatus comprising:(a) a sensor exposed tosaid gaseous atmosphere for providing a signal indicative of theconcentration level of said halogen gas within said gaseous atmosphere;(b) means coupled to said sensor for amplifying said sensor signal tooutput an amplified signal indicative of the halogen gas concentrationlevel, said amplified output signal lying between a first lower and asecond upper limit, said amplifying means having a plurality of discretegains corresponding respectively to said plurality of ranges; (c) meansfor setting said gain of said amplifying means; and (d) means coupled tosaid variable gain amplifying means for determining whether saidamplified output signal is greater than said second upper limit and, ifso, for causing said gain setting means to decrease said gain of saidamplifying means to the next lower discrete gain, whereby said amplifiedoutput signal lies between said first and second limits.
 25. The halogengas detecting and measuring apparatus as claimed in claim 24, whereinsaid amplified output signal is of an analog form, and there is furtherincluded means coupled to said amplifying means for receiving andconverting said analog output signal into a corresponding digitalsignal.
 26. The halogen gas detecting and measuring apparatus as claimedin claim 24, wherein said gain setting means provides an output signalindicative of said one set discrete gain.
 27. The halogen gas detectingand measuring apparatus as claimed in claim 24, wherein said amplifiedoutput signal is of an analog form, and there is further included ananalog to digital converter for receiving and converting said amplifiedanalog output signal into a corresponding digital output signal, saiddetermining means responsive to said digital output signal fordetermining whether said analog to digital converter has overflowed and,if so, for causing said gain setting means to set said gain of saidamplifying means to the next lower discrete gain.
 28. Apparatus fordetecting an increase of a selected difference in the concentration of aparticular gas in a gaseous atmosphere from a first level to a secondlevel thereof, said detecting apparatus comprising:(a) a sensorincluding a heater/element and a collector/cathode element disposed todefine a space therebetween through which said gaseous atmosphere flows:(b) first voltage means coupled to said heater/anode element and saidcollector/cathode element for applying a voltage therebetween to cause acurrent flow between saiD elements proportional to the concentrationlevel of said particular gas in said gaseous atmosphere; (c) firstcontrol means coupled to one of said elements for detecting an increasein said ionization current flow by a corresponding amount as wouldindicate that the concentration level of halogen gas has increased bysaid selected difference to provide a manifestation indicative thereof;(d) second control means responsive to said increased currentmanifestation for controlling said first voltage supplying means,whereby its voltage as applied between said heater/anode element andsaid collector/cathode element is substantially reduced to a level suchthat said ionization current therebetween is extinguished so that thelife of said sensor is extended; and (e) second voltage meanscontinuously coupled across said heater/anode element for applying avoltage thereacross to produce a current sufficient to maintain saidsensor at its operating temperature.